{% load i18n humanize %}
{% load static %}
{% load in_list %}
<div class="form-row">
    <div class="col col-sm-3">
        <label for='id_statuses'>{% trans "Knowledge base item(s)" %}:</label>
    </div>
    <div class="col col-sm-3">
        <select id='id_kbitems' name='kbitem' multiple='selected' size='5'>
            {% with magic_number=-1 %}
            <option value='{{magic_number}}'{% if query_params.filtering_null.kbitem__isnull %} selected='selected'{% endif %}>
                {% trans "Uncategorized" %}
            </option>
            {% endwith %}
            {% for s in kbitem_choices %}
            <option value='{{ s.0 }}'{% if s.0|in_list:query_params.filtering.kbitem__in %} selected='selected'{% endif %}>{{ s.1 }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="col col-sm-6">
        <button class="filterBuilderRemove btn btn-danger btn-sm float-right"><i class="fas fa-trash-alt"></i></button>
    </div>
    <div class='form-row filterHelp'>{% trans "Ctrl-click to select multiple options" %}</div>
</div>
